/**
 * 
 * @param {object} obj 
 * @param {string} key 
 * @param {any} val 
 * @param {?boolean} enumerable 
 */
export function def(obj, key ,val ,enumerable){
    Object.defineProperty(obj, key, {
        value: val,
        enumerable: !!enumerable,
        writable:true,
        configurable:true
    });
}